﻿CREATE TABLE [dbo].[Property]
(
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[RowId] [uniqueidentifier] ROWGUIDCOL DEFAULT (NEWID()) NOT NULL,
	[IsDeleted] [bit] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedDate] [datetime] NOT NULL,
	[ModifiedByUserId] [int] NULL,
	[Version] [timestamp] NOT NULL,
	[EntranceId] [int] NOT NULL,
	[FloorId] [int] NOT NULL,
	[Name] [nvarchar](64) NOT NULL,
	[Number] [smallint] NOT NULL,
	[LeaseArea] [numeric](12,2) NOT NULL,
	[UnitPricePerMonth] [numeric](12,2) NOT NULL,
	[TotalPricePerMonth] [numeric](12,2) NOT NULL,
	[UsageId] [int] NULL,
	[IsSold] [bit] NOT NULL,
	[PropertyStateId] [int] NOT NULL,
	[ActiveLeaseAgreementId] [int] NULL,
	[Description] [nvarchar](512) NULL,
)